<html>
<head>
<title>Banane</title>
<script type="text/javascript">
var main = 0;
var runde = 1;
var i = 0;
var color = "red";

function enter(sag) {
  var code = "<div style='color:"+color+";'>"+sag+"</div>";
  document.getElementById("text").innerHTML = code + document.getElementById("text").innerHTML;
  return true;
}

function colch() {
  if(color=="red") {
    color = "blue";
  }
  else {
    color = "red";
  }
}


function sprich() {
  if(main==0) {
    enter("wotsch e banane");
    colch();
    main++;
  }
  else if(main==1 || main==2) {
    if(main==1) {
      enter("e was");
      colch();
    }
    else {
      enter("e banane");
      colch();
    }
    i++;
    if(i==runde) {
      main++;
      i = 0;
    }
  }
  else if(main==3) {
    enter("ah e banane");
    main = 0;
    runde++;
  }
}

function go() {
  setInterval("sprich()", 1000);
}
</script>
</head>
<body onload="go();">
<h1>Banane...</h1>
<div id="text"></div>
</body>
</html>